package com.apes.enquiry.product.model;


import com.apes.framework.jpa.BaseModel;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import com.apes.scm.masterdata.party.model.PartyRole;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import javax.validation.constraints.NotNull;


/**
 * 类描述：汽车品牌
 *
 * @ClassName AutomobileBrand
 * @Description 描述
 * @Author lilong
 * @Date 2022/10/28 15:00
 * @Version 1.0
 */

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = AutomobileBrand.CONST_TABLE_NAME)
public class AutomobileBrand extends BaseModel {

    public static final String CONST_TABLE_NAME = "MAS_QCCP";//不是汽车厂牌是汽车品牌

    @Id
    @Column(name = "id", length = 6)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "汽车品牌")
    @Comment("编号")
    private String id;

    @NotNull
    @Column(name = "QCPPMC", length = 50)
    @Comment("汽车品牌")
    private String automobileBrand;

    public AutomobileBrand() {
    }

    public AutomobileBrand(String automobileBrand) {
        this.automobileBrand = automobileBrand;
    }
}
